//
//  ViewForViewController4ForSectionHeader.m
//  ProjectA
//
//  Created by dllo on 16/1/29.
//  Copyright © 2016年 刘旺辉. All rights reserved.
//

#import "ViewForViewController4ForSectionHeader.h"
#import "AppMacro.h"
#import "ModelForViewController4.h"
@interface ViewForViewController4ForSectionHeader ()
@property (nonatomic, strong) UILabel *label;
@property (nonatomic, strong) UILabel *title;
@end

@implementation ViewForViewController4ForSectionHeader
- (void)dealloc {
    [_label release];
    [_title release];
    [super dealloc];
}
- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        self.label = [[UILabel alloc] init];
        [self.contentView addSubview:self.label];
        [_label release];
        
        self.title = [[UILabel alloc] init];
        [self.contentView addSubview:self.title];
        [_title release];
    }
    return self;
}
- (void)layoutSubviews {
    
    [super layoutSubviews];
    self.label.frame = CGRectMake(10, 9, 5, self.bounds.size.height - 20);
    self.label.layer.cornerRadius = 3;
    self.label.layer.masksToBounds = YES;
    self.label.backgroundColor = [UIColor redColor];
    
    self.title.frame = CGRectMake(10 + 5 + 5, 12, self.bounds.size.width - 100, self.bounds.size.height - 25);
    self.title.backgroundColor = L_COLOR_CLEAR;
    [UIView setColorWithLabelText:self.title nightColor:L_COLOR_WHITE dayColor:L_COLOR_BLACK];
    [UIView setColorWithLabelView:self.label nightColorWithRed:0 green:0 blue:0 alpha:1 dayColorWithRed:44 green:211 blue:209 alpha:1];

}
- (void)passData:(ModelForViewController4 *)model {
    self.title.text = model.title;
}
@end
